Skip to content

feat: support optional Ray actor resource affinity - #6

Merged
NINGBENZHE merged 7 commits into
redai-studio:mainfrom
RexFlux:feat/ray-resource-affinity
Sep 10, 2026
Merged

feat: support optional Ray actor resource affinity#6
NINGBENZHE merged 7 commits into
redai-studio:mainfrom
RexFlux:feat/ray-resource-affinity

Conversation

@RexFlux

@RexFlux RexFlux commented Sep 8, 2026

Copy link
Copy Markdown

Summary

  • Add optional required_node_resource configuration for the
    TransferQueueController and SimpleStorage actors.
  • Select eligible live Ray nodes and apply hard node affinity.
  • Preserve existing scheduling behavior when the option is omitted or null.
  • Fail fast when no eligible node exists.
  • Log explicit affinity selection at INFO level, following the existing
    TQ_LOGGING_LEVEL configuration.

Validation

  • Resource-affinity tests: 10 passed.
  • Verified hard-affinity creation requests and actual actor placement
    in a live mixed stable/elastic Ray cluster.
  • Verified continued TQ consumption without restarting the TQ actors.
  • The new logging patch has unit-test coverage; it is not yet included
    in the running CE image.

Scope

  • No changes to the default logging level.
  • No changes to configurations that do not enable resource affinity.
  • Full 100-step elastic CE validation is still in progress.

Comment thread transfer_queue/storage/bootstrap/simple_storage_bootstrap.py
Comment thread transfer_queue/utils/common.py Outdated
Allow the TransferQueue controller and SimpleStorage units to opt into hard node affinity based on a user-defined Ray custom resource. Preserve existing scheduling when unset and fail fast when no alive node matches.

Signed-off-by: xudonghui <xudonghui@xiaohongshu.com>
Signed-off-by: xudonghui <xudonghui@xiaohongshu.com>
Signed-off-by: xudonghui <xudonghui@xiaohongshu.com>
Signed-off-by: xudonghui <xudonghui@xiaohongshu.com>
Signed-off-by: xudonghui <xudonghui@xiaohongshu.com>
Preflight storage affinity and account for per-node CPU capacity, including
Controller CPU on its actual Ray node. Roll back only resources owned by
failed affinity initialization and invalidate failed attachment handles.

Add lifecycle, race, retry and heterogeneous-capacity regression tests.
Validation: 154 tests, pre-commit checks, and isolated multi-node Ray init/retry.

Signed-off-by: xudonghui <xudonghui@xiaohongshu.com>
Signed-off-by: xudonghui <xudonghui@xiaohongshu.com>
@RexFlux
RexFlux force-pushed the feat/ray-resource-affinity branch from b36d9ad to 108539c Compare September 10, 2026 07:55
@RexFlux
RexFlux requested a review from NINGBENZHE September 10, 2026 07:58

@NINGBENZHE NINGBENZHE left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@NINGBENZHE
NINGBENZHE merged commit 8686d4e into redai-studio:main Sep 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants